package ch.yoursource.StartPageBuilder;

import java.io.File;

//TODO
public class PageWriter {
    //TODO
    public static void write(String[][] shortcuts) {
        //TODO
        StringBuilder html = new StringBuilder();
        File target = Toolbox.selectFile();
        File curPath = new File("");
        String splitted[] = Toolbox.readFile(curPath.getAbsolutePath()+"\\html.start").split("#BREAKPOINT#");
        html.append(splitted[0]);
        html.append(SPB.getShortcuts());
        html.append(splitted[1]);
        html.append(SPB.getSettings());
        html.append(splitted[2]);
        html.append(SPB.getTitle());
        html.append(splitted[3]);
        Toolbox.stringToFile(html.toString(), target.getAbsolutePath());
        Toolbox.openFileWithDefaultApplication(target.getAbsolutePath());
    }
}